package routers

import (
	"dc-news-admin-api/common/middleware/jwt"
	"dc-news-admin-api/controller"
	"github.com/gin-gonic/gin"
)

func SetupUserRouter(r *gin.Engine) {
	v1Group := r.Group("api/v1")
	authGroup := v1Group.Group("user")
	authGroup.Use(jwt.Auth("admin"))
	{
		authGroup.GET("/list", controller.GetUserListHandler)
		authGroup.DELETE("/:id", controller.DeleteUserHandler)
		authGroup.PUT("/:id/muted", controller.SetUserMuteStatusHandler)
	}
}
